package org.com.fw.consts;

import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.access.SecurityConfig;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;

public class FwConst {

	/**
	 * 匿名权限
	 * 挺奇怪的，权限的前缀为什么要用"ROLE_"呢，我觉得用"PRIVILEGE_"或者"AUTHORITY_"比较恰当。
	 */
	public static final ConfigAttribute ROLE_CONFIG_ANONYMOUS = new SecurityConfig("ROLE_ANONYMOUS");
	
	/**
	 * 公共
	 */
	public static final ConfigAttribute ROLE_CONFIG_PUBLIC = new SecurityConfig("ROLE_PUBLIC");
	
	/**
	 * 超级用户
	 */
	public static final GrantedAuthority ROLE_GRANT_SUPER = new SimpleGrantedAuthority("ROLE_SUPER");

}
